package creational.singleton.eagerman;

import creational.singleton.Singleton;
import lombok.extern.slf4j.Slf4j;

/**
 * 饿汉式单例,枚举类模式实现
 *
 * @author binbin
 * @since 2022/10/4 18:33
 */
@Slf4j
public enum EagerManSingleton3 implements Singleton {

    INSTANCE;

    public void doSomething() {
        log.info("枚举类实现单例.效果就是好!");
    }

    public EagerManSingleton3 getInstance() {
        return INSTANCE;
    }
}
